<template>
    <p>{{ childMsg }}</p>
    <p>父组件传下来的值-----{{ title }}</p>
    <button @click="changParentValue">改变父组件的值</button>
</template>

<script>
export default{
     props:{
        title:'',
     },
     emits:['change'],
    data(){
        return{
            childMsg:"这是子组件的内容"
        }
    },
    methods:{
        changParentValue(){
            this.$emit('change',123)
        }
    }
}
</script>